<?php defined('SYSPATH') or die('No direct script access.');?>
{template 'stourtravel/public/public_min_js'}
{php echo Common::getCss('base.css,base_new.css'); }
{php echo Common::getScript("choose.js,product_add.js,jquery.validate.js,DatePicker/WdatePicker.js"); }
<style>
    .info-item-block > li > .item-bd{
        padding-left: 26px;padding-top: 4px;
    }
    .info-item-block > li > .item-hd{
        width: 26px;
        font-weight: bold;
    }
    .company_select{
        width: 180px;display: inline-block;overflow: hidden;height: 20px;
    }
</style>
<div style="height:460px;">
<ul class="info-item-block" style="height: 400px;overflow-y: scroll;overflow-x: hidden">
    {loop $company_list $k $v}
    <li>
        <span class="item-hd">{$k}：</span>
        <div class="item-bd">
            {loop $v $vv}
            <label title="{$vv['company_name']}" class="company_select"><input type="checkbox" name="express" data-name="{$vv['company_name']}" {if in_array($vv['id'],$idArr)}checked{/if} value="{$vv['id']}">{$vv['company_name']}</label>
            {/loop}
        </div>
    </li>
    {/loop}
</ul>
    <div class="clearfix text-c mt-20">
        <a href="javascript:;" id="cancel-btn" class="btn btn-grey-outline  radius">取消</a>
        <a href="javascript:;" id="confirm-btn" class="btn btn-primary radius ml-10">确定</a>
    </div>
</div>
<script type="text/javascript">
    $(function(){
        window.setTimeout(function(){
            ST.Util.resizeDialog('.s-main');
        },0);

        $(document).on('click','#confirm-btn',function(){
            var express = [];
            $('input[name="express"]:checked').each(function(index,element){
                var item = {
                    name: $(this).attr('data-name'),
                    id: $(this).val()
                };
                express.push(item)
            });
            ST.Util.responseDialog({data:express},true);
        });

        $("#cancel-btn").click(function(){
            ST.Util.closeDialog();
        });
    })
</script>
